import request from  '../utils/request'
export const Login  = data=>request.post("/api/loginAdmin",data)
// 获取统计数据
export const CountAll = ()=>request.get("/api/countAll")
// 定义获取菜单与路由接口
export const UserPermission = ()=>request.get("/api/user_permission")
// 获取用户列表
export const GetStaff = params=>request.get("/api/staff",{params})
// 获取角色
export const GetRole = (params)=>request.get("/api/user_group",{params})
export const AddRole = (data)=>request.post("/api/user_group",data)
export const PutRole = (data)=>request.put("/api/user_group",data)
export const DelRole = (data)=>request.delete("/api/user_group/"+data.id)



// 修改用户
export const UpdateStaff = data=>request.put("/api/staff",data)
// 添加用户
export const AddStaff = data=>request.post("/api/staff",data);


// 添加
export const AddMenu = data=>request.post("/api/permission",data)
// 删除
export const DelMenu = data=>request.delete("/api/permission/"+data.id)
// 修改
export const PutMenu = data=>request.put("/api/permission",data)
// 查询
export const GetMenu = params=>request.get("/api/permission",{params})
// 定义获取统计的接口

export const GetCountStaff = ()=>request.get("/api/countStaff")


